-- GENERATED SPELL FOR [Sapph] --


function spell0_31161(pUnit, Event) --@Chains of Ice,n/a--
pUnit:FullCastSpellOnTarget(61077,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31161', 618, 1)
end

function spell1_31161(pUnit, Event) --@Hungering Cold,n/a--
pUnit:FullCastSpellOnTarget(61058,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31161', 6330, 1)
end

function Sorts_31161(pUnit, Event)
local choix_sorts_31161 = math.random(0, 1)
if choix_sorts_31161 == 0 then
pUnit:RegisterEvent('spell0_31161', 1, 1)
end
if choix_sorts_31161 == 1 then
pUnit:RegisterEvent('spell1_31161', 1, 1)
end
end

function mob31161_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31161', math.random(1500, 3000), 1)
end

function mob31161_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31161_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31161_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31161, 1, 'mob31161_Action')
RegisterUnitEvent(31161, 2, 'mob31161_Leave')
RegisterUnitEvent(31161, 3, 'mob31161_Kill')
RegisterUnitEvent(31161, 4, 'mob31161_Die')
